import json
import pandas as pd
import os

data_path = os.path.abspath('..') + os.sep + 'data' + os.sep


def to_csv(filename):
    file_path = data_path + filename
    json_data = pd.read_json(file_path)
    json_data.head()
    json_data.to_csv(data_path+"filename.csv")
